package com.lct.d17_this;

public class Test1 {
	public static void main(String[] args) {
		//this调用兄弟构造器
		Student s1 = new Student("wukong",500,"三星洞");
		System.out.println(s1.getAge());
		System.out.println(s1.getName());
		System.out.println(s1.getSchoolName());

		//只要不给学校，系统默认给学校值
		//注意事项：
		//this(...) super(...)不能同时出现，并且只能出现在第一行
		Student s2 = new Student("蜘蛛精",900);
		System.out.println(s2.getAge());
		System.out.println(s2.getName());
		System.out.println(s2.getSchoolName());


	}
}
